<!DOCTYPE HTML>
<html>

<head>
    <title> Project Preview </title>
    <script src="https://ui5.sap.com/1.129.2/resources/sap-ui-core.js" 
            id="sap-ui-bootstrap"
            data-sap-ui-theme="sap_horizon"
            data-sap-ui-bindingSyntax="complex" 
            data-sap-ui-xx-bindingSyntax="complex"
            data-sap-ui-resourceroots='{"assets": "assets"}' 
            data-sap-ui-libs="sap.m,sap.uxap,sap.ui.layout,sap.f">
    </script>
    <link rel="stylesheet" href="assets/preview.css">
</head>

<body id="body" class="sapUiBody">
    <script>
        "use strict";
        sap.ui.localResources("assets");
        (function (jQuery, App, Page) {
            sap.ui.getCore().attachInit(function () {
                sap.ui.define([
                    "sap/ui/core/mvc/Controller",
                    "sap/ui/model/json/JSONModel"
                ], function (Controller, JSONModel) {
                    return Controller.extend("PreviewController", {
                        onInit: function () {

                            const data = {"Services":[{"ServiceName":"capzgz1Service","DetailsURL":"./service/cap_zgz1Svcs/","Metadata":"./service/cap_zgz1Svcs/$metadata","Entities":[{"Name":"emp","URL":"./service/cap_zgz1Svcs/emp","FioriURL":"$fiori-preview/capzgz1Service/emp#preview-app"}],"EntitiesCount":1}]}
                            this.getView().setModel(new JSONModel(data));
                        }
                    });
                });
                var oApp = new App()
                var previewView = sap.ui.view({
                    viewName: "assets.Preview",
                    type: sap.ui.core.mvc.ViewType.XML
                });
                oApp.addPage(new Page({
                    content: [previewView],
                    showHeader: false
                })).placeAt("content");
            });

        }(jQuery, sap.m.App, sap.m.Page));
    </script>
    <div id="content"></div>
</body>

</html>